home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9672 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: ida.his.se!usenet
  2. From: Stefan 'Stetson' Skoglund <sp2stes1@ida.his.se>
  3. Newsgroups: comp.lang.c,gnu.gcc.help,comp.unix.programmer
  4. Subject: Re: Help for using bcopy function
  5. Date: 12 Mar 1996 12:57:35 +0100
  6. Organization: University of Skoevde, Skoevde Sweden
  7. Sender: sp2stes1@ernst.ida.his.se
  8. Message-ID: <y9yspfe5xsg.fsf@ernst.ida.his.se>
  9. References: <4gl53u$4bv@kocrsv08.delcoelect.com>
  10.     <ELIAS.96Feb27144032@cepheus.omicron.se>
  11.     <31372F78.167EB0E7@pia.bt.co.uk> <y9ybumcc5i0.fsf@ernst.ida.his.se>
  12.     <4hhntlINNr3k@keats.ugrad.cs.ubc.ca>
  13. Reply-To: Stefan 'Stetson' Skoglund <sp2stes1@ida.his.se>
  14. NNTP-Posting-Host: ernst.ida.his.se
  15. In-reply-to: c2a192@ugrad.cs.ubc.ca's message of 5 Mar 1996 07:51:17 -0800
  16. X-Newsreader: Gnus v5.1
  17.  
  18.  
  19. >>>>> "Kazimir" == Kazimir Kylheku <c2a192@ugrad.cs.ubc.ca> writes:
  20.  
  21.     Kazimir> SunOS 2.4? Man, that is ancient. (Or you surely mean
  22.     Kazimir> _Solaris_ 2.4?)
  23.  
  24. I was thinking about SunsOS 5.4 yes.
  25.  
  26.     Kazimir> bcopy() is frequently used to copy an array of four
  27.     Kazimir> characters representing an inet address (derived from the
  28.     Kazimir> struct hostent structure which comes from
  29.     Kazimir> gethostbyname()) over top of a struct in_addr (part of a
  30.     Kazimir> struct sockaddr_in), which holds an unsigned int. It's
  31.     Kazimir> ugly, but go figure.  :) --
  32.  
  33. I usually use a number of casts and one assignment, no bcopy.
  34. Either way I would still use mem{cpy|move}. By the way :
  35. the socket routines on sunos 5.4 is in /usr/lib/libsocket.so.
  36. /usr/ucblib/* is purely bsd compatibility.
  37. -- 
  38. ---------------------------------------------------------------------
  39. Stefan 'Stetson' Skoglund          I               |
  40. sp2stes1@ida.his.se                I               |
  41. <http://www.his.se/ida/~sp2stes1/> I         _____/0\_____
  42.                                    I ____________O(.)O___________
  43. H\"ogskolan i Sk\"ovde, Sverige    I      I-+-I    O    I-+-I
  44.                                    I
  45.                                    I      Viggen with two Rb04
  46. ---------------------------------------------------------------------
  47.